<template>
<div>
  <div @dblclick="handleDbclick">Test</div>

  <img alt="Vue logo" src="@/assets/logo.png">

  <div v-if="showFormDialog">!!!!!!</div>

  <HelloWorld msg="Welcome to Your Vue.js App"/>

  <v-card
      class="mx-auto"
      max-width="400"
      elevation="24"
    >
      <v-img
        class="white--text align-end"
        height="200px"
        src="https://cdn.vuetifyjs.com/images/cards/docks.jpg"
      >
        <v-card-title>Top 10 Australian beaches</v-card-title>
      </v-img>

      <v-card-subtitle class="pb-0">Number 10</v-card-subtitle>

      <v-card-text class="text--primary">
        <div>Whitehaven Beach</div>

        <div>Whitsunday Island, Whitsunday Islands</div>
      </v-card-text>

      <v-card-actions>
        <v-btn
          color="orange"
          text
        >
          Share
        </v-btn>

        <v-btn
          color="orange"
          text
        >
          Explore
        </v-btn>
      </v-card-actions>
    </v-card>
</div>
</template>

<script>
import { mapState } from 'vuex'
import moment from 'moment'
import HelloWorld from '@/components/HelloWorld.vue'
export default {
  name: 'Test',

  components: {
    HelloWorld
  },

  data () {
    return {}
  },

  computed: {
    ...mapState({
      showFormDialog: state => state.Home.showFormDialog
    })
  },

  mounted () {
    this.$axios.get(`https://pagead2.googlesyndication.com/getconfig/sodar?sv=200&tid=gda&tv=r${moment().format("YYYYMMDD")}&st=env`, { a: '1' })
    .then(response => {
      console.info(response)
    }).catch(e => {
      console.info(e)
    })
  },

  methods: {
    handleDbclick () {
      // this.$store.commit('Home/setShowFormDialog', this.$t('message.salesDiaryMessage.created'))
      this.$store.commit('Home/setShowFormDialog', true)
    }
  }
}
</script>

<style lang="sass" scoped>

</style>